#endif
#ifdef GDK_WINDOWING_QUARTZ
-#include "quartz/gdkdisplaymanager-quartz.h"
+/* We immediately include gdkquartzdisplaymanager.h here instead of
+ * gdkquartz.h so that we do not have to enable -xobjective-c for the
+ * "generic" GDK source code.
+ */
+#include "quartz/gdkquartzdisplaymanager.h"
#endif
*/
#import "GdkQuartzView.h"
-#include "gdkwindow-quartz.h"
+#include "gdkquartzwindow.h"
#include "gdkprivate-quartz.h"
#include "gdkquartz.h"
*/
#import "GdkQuartzWindow.h"
-#include "gdkwindow-quartz.h"
+#include "gdkquartzwindow.h"
+#include "gdkdnd-quartz.h"
#include "gdkprivate-quartz.h"
@implementation GdkQuartzNSWindow
include $(top_srcdir)/Makefile.decl
libgdkincludedir = $(includedir)/gtk-3.0/gdk
+libgdkquartzincludedir = $(includedir)/gtk-3.0/gdk/quartz
INCLUDES = \
-DG_LOG_DOMAIN=\"Gdk\" \
GdkQuartzWindow.c \
GdkQuartzWindow.h \
gdkcursor-quartz.c \
- gdkcursor-quartz.h \
gdkdevice-core-quartz.c \
- gdkdevice-core-quartz.h \
gdkdevicemanager-core-quartz.c \
gdkdevicemanager-core-quartz.h \
gdkdisplay-quartz.c \
- gdkdisplay-quartz.h \
gdkdisplaymanager-quartz.c \
- gdkdisplaymanager-quartz.h \
gdkdnd-quartz.c \
gdkdnd-quartz.h \
gdkevents-quartz.c \
libgdkinclude_HEADERS = \
gdkquartz.h
+libgdkquartzinclude_HEADERS = \
+ gdkquartzcursor.h \
+ gdkquartzdevice-core.h \
+ gdkquartzdevicemanager-core.h \
+ gdkquartzdisplay.h \
+ gdkquartzdisplaymanager.h \
+ gdkquartzdnd.h \
+ gdkquartzkeys.h \
+ gdkquartzscreen.h \
+ gdkquartzutils.h \
+ gdkquartzvisual.h \
+ gdkquartzwindow.h
+
-include $(top_srcdir)/git.mk
#include "gdkdisplay.h"
#include "gdkcursor.h"
-#include "gdkcursor-quartz.h"
+#include "gdkcursorprivate.h"
+#include "gdkquartzcursor.h"
#include "gdkprivate-quartz.h"
#include "xcursors.h"
+struct _GdkQuartzCursor
+{
+ GdkCursor cursor;
+
+ NSCursor *nscursor;
+};
+
+struct _GdkQuartzCursorClass
+{
+ GdkCursorClass cursor_class;
+};
+
+
static GdkCursor *cached_xcursors[G_N_ELEMENTS (xcursors)];
static GdkCursor *
*height = 65536;
}
+NSCursor *
+_gdk_quartz_cursor_get_ns_cursor (GdkCursor *cursor)
+{
+ GdkQuartzCursor *cursor_private;
+
+ if (!cursor)
+ return [NSCursor arrowCursor];
+
+ g_return_val_if_fail (GDK_IS_QUARTZ_CURSOR (cursor), NULL);
+
+ cursor_private = GDK_QUARTZ_CURSOR (cursor);
+
+ return cursor_private->nscursor;
+}
+
static GdkPixbuf *
gdk_quartz_cursor_get_image (GdkCursor *cursor)
{
+++ /dev/null
-/* gdkcursor-quartz.h
- *
- * Copyright (C) 2005-2007 Imendio AB
- * Copyright (C) 2010 Kristian Rietveld <kris@gtk.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GDK_QUARTZ_CURSOR_H__
-#define __GDK_QUARTZ_CURSOR_H__
-
-#include <gdk/gdk.h>
-#include <gdk/quartz/gdkquartz.h>
-#include "gdkcursorprivate.h"
-
-G_BEGIN_DECLS
-
-#define GDK_TYPE_QUARTZ_CURSOR (gdk_quartz_cursor_get_type ())
-#define GDK_QUARTZ_CURSOR(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_CURSOR, GdkQuartzCursor))
-#define GDK_QUARTZ_CURSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_CURSOR, GdkQuartzCursorClass))
-#define GDK_IS_QUARTZ_CURSOR(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_CURSOR))
-#define GDK_IS_QUARTZ_CURSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_CURSOR))
-#define GDK_QUARTZ_CURSOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_CURSOR, GdkQuartzCursorClass))
-
-typedef struct _GdkQuartzCursor GdkQuartzCursor;
-typedef struct _GdkQuartzCursorClass GdkQuartzCursorClass;
-
-struct _GdkQuartzCursor
-{
- GdkCursor cursor;
-
- NSCursor *nscursor;
-};
-
-struct _GdkQuartzCursorClass
-{
- GdkCursorClass cursor_class;
-};
-
-GType gdk_quartz_cursor_get_type (void);
-
-G_END_DECLS
-
-#endif /* __GDK_QUARTZ_CURSOR_H__ */
#include "config.h"
+#include <gdk/gdkdeviceprivate.h>
#include <gdk/gdkdisplayprivate.h>
#import "GdkQuartzView.h"
-#include "gdkwindow-quartz.h"
-#include "gdkcursor-quartz.h"
+#include "gdkquartzwindow.h"
+#include "gdkquartzcursor.h"
#include "gdkprivate-quartz.h"
-#include "gdkdevice-core-quartz.h"
+#include "gdkquartzdevice-core.h"
+
+struct _GdkQuartzDeviceCore
+{
+ GdkDevice parent_instance;
+};
+
+struct _GdkQuartzDeviceCoreClass
+{
+ GdkDeviceClass parent_class;
+};
static gboolean gdk_quartz_device_core_get_history (GdkDevice *device,
GdkWindow *window,
GdkWindow *window,
GdkCursor *cursor)
{
- GdkQuartzCursor *cursor_private;
NSCursor *nscursor;
- cursor_private = (GdkQuartzCursor *) cursor;
-
if (GDK_WINDOW_DESTROYED (window))
return;
- if (!cursor)
- nscursor = [NSCursor arrowCursor];
- else
- nscursor = cursor_private->nscursor;
+ nscursor = _gdk_quartz_cursor_get_ns_cursor (cursor);
[nscursor set];
}
+++ /dev/null
-/* GDK - The GIMP Drawing Kit
- * Copyright (C) 2009 Carlos Garnacho <carlosg@gnome.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GDK_QUARTZ_DEVICE_CORE_H__
-#define __GDK_QUARTZ_DEVICE_CORE_H__
-
-#include <gdk/gdkdeviceprivate.h>
-
-G_BEGIN_DECLS
-
-#define GDK_TYPE_QUARTZ_DEVICE_CORE (gdk_quartz_device_core_get_type ())
-#define GDK_QUARTZ_DEVICE_CORE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_QUARTZ_DEVICE_CORE, GdkQuartzDeviceCore))
-#define GDK_QUARTZ_DEVICE_CORE_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_QUARTZ_DEVICE_CORE, GdkQuartzDeviceCoreClass))
-#define GDK_IS_QUARTZ_DEVICE_CORE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_QUARTZ_DEVICE_CORE))
-#define GDK_IS_QUARTZ_DEVICE_CORE_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_QUARTZ_DEVICE_CORE))
-#define GDK_QUARTZ_DEVICE_CORE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_QUARTZ_DEVICE_CORE, GdkQuartzDeviceCoreClass))
-
-typedef struct _GdkQuartzDeviceCore GdkQuartzDeviceCore;
-typedef struct _GdkQuartzDeviceCoreClass GdkQuartzDeviceCoreClass;
-
-struct _GdkQuartzDeviceCore
-{
- GdkDevice parent_instance;
-};
-
-struct _GdkQuartzDeviceCoreClass
-{
- GdkDeviceClass parent_class;
-};
-
-GType gdk_quartz_device_core_get_type (void) G_GNUC_CONST;
-
-G_END_DECLS
-
-#endif /* __GDK_QUARTZ_DEVICE_CORE_H__ */
#include <gdk/gdktypes.h>
#include <gdk/gdkdevicemanager.h>
+#include <gdk/gdkdeviceprivate.h>
+#include <gdk/gdkdevicemanagerprivate.h>
#include "gdkdevicemanager-core-quartz.h"
-#include "gdkdevice-core-quartz.h"
+#include "gdkquartzdevice-core.h"
#include "gdkkeysyms.h"
-/* GDK - The GIMP Drawing Kit
+/* gdkdevicemanager-quartz.h
+ *
* Copyright (C) 2009 Carlos Garnacho <carlosg@gnome.org>
+ * Copyright (C) 2010 Kristian Rietveld <kris@gtk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Boston, MA 02111-1307, USA.
*/
-#ifndef __GDK_QUARTZ_DEVICE_MANAGER_CORE_H__
-#define __GDK_QUARTZ_DEVICE_MANAGER_CORE_H__
+#ifndef __GDK_QUARTZ_DEVICE_MANAGER_CORE__
+#define __GDK_QUARTZ_DEVICE_MANAGER_CORE__
-#include <gdk/gdkdevicemanagerprivate.h>
+#include <gdkdevicemanagerprivate.h>
+#include <gdkquartzdevicemanager-core.h>
G_BEGIN_DECLS
-#define GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE (gdk_quartz_device_manager_core_get_type ())
-#define GDK_QUARTZ_DEVICE_MANAGER_CORE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE, GdkQuartzDeviceManagerCore))
-#define GDK_QUARTZ_DEVICE_MANAGER_CORE_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE, GdkQuartzDeviceManagerCoreClass))
-#define GDK_IS_QUARTZ_DEVICE_MANAGER_CORE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE))
-#define GDK_IS_QUARTZ_DEVICE_MANAGER_CORE_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE))
-#define GDK_QUARTZ_DEVICE_MANAGER_CORE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE, GdkQuartzDeviceManagerCoreClass))
-
-typedef struct _GdkQuartzDeviceManagerCore GdkQuartzDeviceManagerCore;
-typedef struct _GdkQuartzDeviceManagerCoreClass GdkQuartzDeviceManagerCoreClass;
-
struct _GdkQuartzDeviceManagerCore
{
GdkDeviceManager parent_object;
GdkDeviceManagerClass parent_class;
};
-GType gdk_quartz_device_manager_core_get_type (void) G_GNUC_CONST;
-
-
G_END_DECLS
-#endif /* __GDK_QUARTZ_DEVICE_MANAGER_CORE_H__ */
+#endif /* __GDK_QUARTZ_DEVICE_MANAGER__ */
#include "config.h"
-#include "gdk.h"
+#include <gdk/gdk.h>
+#include <gdk/gdkdisplayprivate.h>
+
#include "gdkprivate-quartz.h"
-#include "gdkscreen-quartz.h"
-#include "gdkwindow-quartz.h"
-#include "gdkdisplay-quartz.h"
-#include "gdkdevicemanager-core-quartz.h"
+#include "gdkquartzscreen.h"
+#include "gdkquartzwindow.h"
+#include "gdkquartzdisplay.h"
+#include "gdkquartzdevicemanager-core.h"
+
+
+struct _GdkQuartzDisplay
+{
+ GdkDisplay display;
+
+ GList *input_devices;
+};
+
+struct _GdkQuartzDisplayClass
+{
+ GdkDisplayClass display_class;
+};
static GdkWindow *
gdk_quartz_display_get_default_group (GdkDisplay *display)
_gdk_display = g_object_new (_gdk_quartz_display_get_type (), NULL);
_gdk_display->device_manager = _gdk_device_manager_new (_gdk_display);
- _gdk_screen = _gdk_quartz_screen_new ();
+ _gdk_screen = g_object_new (_gdk_quartz_screen_get_type (), NULL);
_gdk_quartz_screen_init_visuals (_gdk_screen);
+++ /dev/null
-/* gdkdisplay-quartz.h
- *
- * Copyright (C) 2005-2007 Imendio AB
- * Copyright (C) 2010 Kristian Rietveld <kris@gtk.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GDK_QUARTZ_DISPLAY_H__
-#define __GDK_QUARTZ_DISPLAY_H__
-
-#include <gdk/gdk.h>
-#include "gdkdisplayprivate.h"
-
-G_BEGIN_DECLS
-
-#define GDK_TYPE_QUARTZ_DISPLAY (_gdk_quartz_display_get_type ())
-#define GDK_QUARTZ_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_DISPLAY, GdkQuartzDisplay))
-#define GDK_QUARTZ_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_DISPLAY, GdkQuartzDisplayClass))
-#define GDK_IS_QUARTZ_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_DISPLAY))
-#define GDK_IS_QUARTZ_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_DISPLAY))
-#define GDK_QUARTZ_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_DISPLAY, GdkQuartzDisplayClass))
-
-typedef struct _GdkQuartzDisplay GdkQuartzDisplay;
-typedef struct _GdkQuartzDisplayClass GdkQuartzDisplayClass;
-
-struct _GdkQuartzDisplay
-{
- GdkDisplay display;
-
- GList *input_devices;
-};
-
-struct _GdkQuartzDisplayClass
-{
- GdkDisplayClass display_class;
-};
-
-GType _gdk_quartz_display_get_type (void);
-
-G_END_DECLS
-
-#endif /* __GDK_QUARTZ_DISPLAY_H__ */
#include <dlfcn.h>
#include <ApplicationServices/ApplicationServices.h>
-#include "gdkdisplay-quartz.h"
-#include "gdkdisplaymanager-quartz.h"
+#include "gdkquartzdisplay.h"
+#include "gdkquartzdisplaymanager.h"
#include "gdkprivate-quartz.h"
#include "gdkdisplaymanagerprivate.h"
#include "gdkinternals.h"
+struct _GdkQuartzDisplayManager
+{
+ GdkDisplayManager parent;
+
+ GdkDisplay *default_display;
+ GSList *displays;
+};
+
G_DEFINE_TYPE (GdkQuartzDisplayManager, gdk_quartz_display_manager, GDK_TYPE_DISPLAY_MANAGER)
+++ /dev/null
-/* gdkdisplaymanager-quartz.h
- *
- * Copyright (C) 2005-2007 Imendio AB
- * Copyright 2010 Red Hat, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __GDK_QUARTZ_DISPLAYMANAGER_H__
-#define __GDK_QUARTZ_DISPLAYMANAGER_H__
-
-#include <gdk/gdk.h>
-#include <gdk/gdkdisplaymanagerprivate.h>
-
-G_BEGIN_DECLS
-
-#define GDK_TYPE_QUARTZ_DISPLAY_MANAGER (gdk_quartz_display_manager_get_type ())
-#define GDK_QUARTZ_DISPLAY_MANAGER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_DISPLAY_MANAGER, GdkQuartzDisplayManager))
-
-typedef struct _GdkQuartzDisplayManager GdkQuartzDisplayManager;
-typedef struct _GdkDisplayManagerClass GdkQuartzDisplayManagerClass;
-
-struct _GdkQuartzDisplayManager
-{
- GdkDisplayManager parent;
-
- GdkDisplay *default_display;
- GSList *displays;
-};
-
-GType gdk_quartz_display_manager_get_type (void);
-
-G_END_DECLS
-
-#endif /* __GDK_QUARTZ_DISPLAYMANAGER_H__ */
*/
#include "gdkdnd.h"
-#include "gdkdnd-quartz.h"
+#include "gdkquartzdnd.h"
#include "gdkprivate-quartz.h"
+
G_DEFINE_TYPE (GdkQuartzDragContext, gdk_quartz_drag_context, GDK_TYPE_DRAG_CONTEXT)
/* gdkdnd-quartz.h
*
- * Copyright (C) 2010 Kristian Rietveld <kris@gtk.org>
+ * Copyright (C) 2005 Imendio AB
+ * Copyright (C) 2010 Kristian Rietveld <kris@gtk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Boston, MA 02111-1307, USA.
*/
-#ifndef __GDK_QUARTZ_DND_H__
-#define __GDK_QUARTZ_DND_H__
+#ifndef __GDK_QUARTZ_DND__
+#define __GDK_QUARTZ_DND__
-#include <gdk/gdk.h>
-#include <gdk/quartz/gdkquartz.h>
-#include <gdk/gdkdndprivate.h>
+#include <gdkdndprivate.h>
+#include <gdkquartzdnd.h>
-G_BEGIN_DECLS
-
-#define GDK_TYPE_QUARTZ_DRAG_CONTEXT (gdk_quartz_drag_context_get_type ())
-#define GDK_QUARTZ_DRAG_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_DRAG_CONTEXT, GdkQuartzDragContext))
-#define GDK_QUARTZ_DRAG_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_DRAG_CONTEXT, GdkQuartzDragContextClass))
-#define GDK_IS_QUARTZ_DRAG_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_DRAG_CONTEXT))
-#define GDK_IS_QUARTZ_DRAG_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_DRAG_CONTEXT))
-#define GDK_QUARTZ_DRAG_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_DRAG_CONTEXT, GdkQuartzDragContextClass))
+#include <AppKit/AppKit.h>
-typedef struct _GdkQuartzDragContext GdkQuartzDragContext;
-typedef struct _GdkQuartzDragContextClass GdkQuartzDragContextClass;
+G_BEGIN_DECLS
struct _GdkQuartzDragContext
{
GdkDragContextClass context_class;
};
-GType gdk_quartz_drag_context_get_type (void);
-
G_END_DECLS
-#endif /* __GDK_QUARTZ_DRAG_CONTEXT_H__ */
+#endif /* __GDK_QUARTZ_DND__ */
#import <Cocoa/Cocoa.h>
#include <Carbon/Carbon.h>
+#include <gdk/gdkdisplayprivate.h>
+
#include "gdkscreen.h"
#include "gdkkeysyms.h"
-#include "gdkdisplay-quartz.h"
+#include "gdkquartzdisplay.h"
#include "gdkprivate-quartz.h"
-#include "gdkdevicemanager-core-quartz.h"
+#include "gdkquartzdevicemanager-core.h"
#define GRIP_WIDTH 15
#define GRIP_HEIGHT 15
#include <Carbon/Carbon.h>
#include <AppKit/NSEvent.h>
#include "gdk.h"
+#include "gdkquartzkeys.h"
#include "gdkkeysprivate.h"
#include "gdkkeysyms.h"
static GdkKeymap *default_keymap = NULL;
-
-#define GDK_TYPE_QUARTZ_KEYMAP (gdk_quartz_keymap_get_type ())
-#define GDK_QUARTZ_KEYMAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_KEYMAP, GdkQuartzKeymap))
-#define GDK_QUARTZ_KEYMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_KEYMAP, GdkQuartzKeymapClass))
-#define GDK_IS_QUARTZ_KEYMAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_KEYMAP))
-#define GDK_IS_QUARTZ_KEYMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_KEYMAP))
-#define GDK_QUARTZ_KEYMAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_KEYMAP, GdkQuartzKeymapClass))
-
-typedef struct _GdkQuartzKeymap GdkQuartzKeymap;
-typedef struct _GdkQuartzKeymapClass GdkQuartzKeymapClass;
-
struct _GdkQuartzKeymap
{
GdkKeymap keymap;
#define GDK_QUARTZ_RELEASE_POOL [pool release]
#include <gdk/gdkprivate.h>
-#include <gdk/quartz/gdkwindow-quartz.h>
-#include <gdk/quartz/gdkdnd-quartz.h>
#include <gdk/quartz/gdkquartz.h>
+#include <gdk/quartz/gdkdevicemanager-core-quartz.h>
+#include <gdk/quartz/gdkdnd-quartz.h>
+#include <gdk/quartz/gdkscreen-quartz.h>
+#include <gdk/quartz/gdkwindow-quartz.h>
#include <gdk/gdk.h>
GDK_QUARTZ_CONTEXT_TEXT = 1 << 2
} GdkQuartzContextValuesMask;
+/* Cursor */
+NSCursor *_gdk_quartz_cursor_get_ns_cursor (GdkCursor *cursor);
+
/* Window */
gboolean _gdk_quartz_window_is_ancestor (GdkWindow *ancestor,
GdkWindow *window);
#define __GDK_QUARTZ_H__
#include <AppKit/AppKit.h>
+
+#include <gdk/gdk.h>
#include <gdk/gdkprivate.h>
G_BEGIN_DECLS
typedef float CGFloat;
#endif
-NSWindow *gdk_quartz_window_get_nswindow (GdkWindow *window);
-NSView *gdk_quartz_window_get_nsview (GdkWindow *window);
-NSImage *gdk_quartz_pixbuf_to_ns_image_libgtk_only (GdkPixbuf *pixbuf);
-id gdk_quartz_drag_context_get_dragging_info_libgtk_only (GdkDragContext *context);
-NSEvent *gdk_quartz_event_get_nsevent (GdkEvent *event);
-
G_END_DECLS
+#define __GDKQUARTZ_H_INSIDE__
+
+#include <gdk/quartz/gdkquartzcursor.h>
+#include <gdk/quartz/gdkquartzdevice-core.h>
+#include <gdk/quartz/gdkquartzdevicemanager-core.h>
+#include <gdk/quartz/gdkquartzdisplay.h>
+#include <gdk/quartz/gdkquartzdisplaymanager.h>
+#include <gdk/quartz/gdkquartzdnd.h>
+#include <gdk/quartz/gdkquartzkeys.h>
+#include <gdk/quartz/gdkquartzscreen.h>
+#include <gdk/quartz/gdkquartzutils.h>
+#include <gdk/quartz/gdkquartzvisual.h>
+#include <gdk/quartz/gdkquartzwindow.h>
+
+#undef __GDKQUARTZ_H_INSIDE__
+
#endif /* __GDK_QUARTZ_H__ */
--- /dev/null
+/* gdkquartzcursor.h
+ *
+ * Copyright (C) 2005-2007 Imendio AB
+ * Copyright (C) 2010 Kristian Rietveld <kris@gtk.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#if !defined(__GDKQUARTZ_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdkquartz.h> can be included directly."
+#endif
+
+#ifndef __GDK_QUARTZ_CURSOR_H__
+#define __GDK_QUARTZ_CURSOR_H__
+
+#include <gdk/gdk.h>
+
+G_BEGIN_DECLS
+
+#define GDK_TYPE_QUARTZ_CURSOR (gdk_quartz_cursor_get_type ())
+#define GDK_QUARTZ_CURSOR(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_CURSOR, GdkQuartzCursor))
+#define GDK_QUARTZ_CURSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_CURSOR, GdkQuartzCursorClass))
+#define GDK_IS_QUARTZ_CURSOR(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_CURSOR))
+#define GDK_IS_QUARTZ_CURSOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_CURSOR))
+#define GDK_QUARTZ_CURSOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_CURSOR, GdkQuartzCursorClass))
+
+#ifdef GDK_COMPILATION
+typedef struct _GdkQuartzCursor GdkQuartzCursor;
+#else
+typedef GdkCursor GdkQuartzCursor;
+#endif
+typedef struct _GdkQuartzCursorClass GdkQuartzCursorClass;
+
+GType gdk_quartz_cursor_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GDK_QUARTZ_CURSOR_H__ */
--- /dev/null
+/* GDK - The GIMP Drawing Kit
+ * Copyright (C) 2009 Carlos Garnacho <carlosg@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#if !defined(__GDKQUARTZ_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdkquartz.h> can be included directly."
+#endif
+
+#ifndef __GDK_QUARTZ_DEVICE_CORE_H__
+#define __GDK_QUARTZ_DEVICE_CORE_H__
+
+#include <gdk/gdk.h>
+
+G_BEGIN_DECLS
+
+#define GDK_TYPE_QUARTZ_DEVICE_CORE (gdk_quartz_device_core_get_type ())
+#define GDK_QUARTZ_DEVICE_CORE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_QUARTZ_DEVICE_CORE, GdkQuartzDeviceCore))
+#define GDK_QUARTZ_DEVICE_CORE_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_QUARTZ_DEVICE_CORE, GdkQuartzDeviceCoreClass))
+#define GDK_IS_QUARTZ_DEVICE_CORE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_QUARTZ_DEVICE_CORE))
+#define GDK_IS_QUARTZ_DEVICE_CORE_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_QUARTZ_DEVICE_CORE))
+#define GDK_QUARTZ_DEVICE_CORE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_QUARTZ_DEVICE_CORE, GdkQuartzDeviceCoreClass))
+
+typedef struct _GdkQuartzDeviceCore GdkQuartzDeviceCore;
+typedef struct _GdkQuartzDeviceCoreClass GdkQuartzDeviceCoreClass;
+
+GType gdk_quartz_device_core_get_type (void) G_GNUC_CONST;
+
+G_END_DECLS
+
+#endif /* __GDK_QUARTZ_DEVICE_CORE_H__ */
--- /dev/null
+/* GDK - The GIMP Drawing Kit
+ * Copyright (C) 2009 Carlos Garnacho <carlosg@gnome.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#if !defined(__GDKQUARTZ_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdkquartz.h> can be included directly."
+#endif
+
+#ifndef __GDK_QUARTZ_DEVICE_MANAGER_CORE_H__
+#define __GDK_QUARTZ_DEVICE_MANAGER_CORE_H__
+
+#include <gdk/gdk.h>
+
+G_BEGIN_DECLS
+
+#define GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE (gdk_quartz_device_manager_core_get_type ())
+#define GDK_QUARTZ_DEVICE_MANAGER_CORE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE, GdkQuartzDeviceManagerCore))
+#define GDK_QUARTZ_DEVICE_MANAGER_CORE_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE, GdkQuartzDeviceManagerCoreClass))
+#define GDK_IS_QUARTZ_DEVICE_MANAGER_CORE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE))
+#define GDK_IS_QUARTZ_DEVICE_MANAGER_CORE_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE))
+#define GDK_QUARTZ_DEVICE_MANAGER_CORE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDK_TYPE_QUARTZ_DEVICE_MANAGER_CORE, GdkQuartzDeviceManagerCoreClass))
+
+typedef struct _GdkQuartzDeviceManagerCore GdkQuartzDeviceManagerCore;
+typedef struct _GdkQuartzDeviceManagerCoreClass GdkQuartzDeviceManagerCoreClass;
+
+
+GType gdk_quartz_device_manager_core_get_type (void) G_GNUC_CONST;
+
+
+G_END_DECLS
+
+#endif /* __GDK_QUARTZ_DEVICE_MANAGER_CORE_H__ */
--- /dev/null
+/* gdkquartzdisplay.h
+ *
+ * Copyright (C) 2005-2007 Imendio AB
+ * Copyright (C) 2010 Kristian Rietveld <kris@gtk.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#if !defined(__GDKQUARTZ_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdkquartz.h> can be included directly."
+#endif
+
+#ifndef __GDK_QUARTZ_DISPLAY_H__
+#define __GDK_QUARTZ_DISPLAY_H__
+
+#include <gdk/gdk.h>
+
+G_BEGIN_DECLS
+
+#define GDK_TYPE_QUARTZ_DISPLAY (_gdk_quartz_display_get_type ())
+#define GDK_QUARTZ_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_DISPLAY, GdkQuartzDisplay))
+#define GDK_QUARTZ_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_DISPLAY, GdkQuartzDisplayClass))
+#define GDK_IS_QUARTZ_DISPLAY(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_DISPLAY))
+#define GDK_IS_QUARTZ_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_DISPLAY))
+#define GDK_QUARTZ_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_DISPLAY, GdkQuartzDisplayClass))
+
+#ifdef GDK_COMPILATION
+typedef struct _GdkQuartzDisplay GdkQuartzDisplay;
+#else
+typedef GdkDisplay GdkQuartzDisplay;
+#endif
+typedef struct _GdkQuartzDisplayClass GdkQuartzDisplayClass;
+
+
+GType _gdk_quartz_display_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GDK_QUARTZ_DISPLAY_H__ */
--- /dev/null
+/* gdkquartzdisplaymanager.h
+ *
+ * Copyright (C) 2005-2007 Imendio AB
+ * Copyright 2010 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#if !defined(__GDKQUARTZ_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdkquartz.h> can be included directly."
+#endif
+
+#ifndef __GDK_QUARTZ_DISPLAY_MANAGER_H__
+#define __GDK_QUARTZ_DISPLAY_MANAGER_H__
+
+#include <gdk/gdk.h>
+
+G_BEGIN_DECLS
+
+#define GDK_TYPE_QUARTZ_DISPLAY_MANAGER (gdk_quartz_display_manager_get_type ())
+#define GDK_QUARTZ_DISPLAY_MANAGER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_DISPLAY_MANAGER, GdkQuartzDisplayManager))
+
+#ifdef GDK_COMPILATION
+typedef struct _GdkQuartzDisplayManager GdkQuartzDisplayManager;
+#else
+typedef GdkDisplayManager _GdkQuartzDisplayManager;
+#endif
+typedef struct _GdkDisplayManagerClass GdkQuartzDisplayManagerClass;
+
+
+GType gdk_quartz_display_manager_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GDK_QUARTZ_DISPLAY_MANAGER_H__ */
--- /dev/null
+/* gdkquartzdnd.h
+ *
+ * Copyright (C) 2010 Kristian Rietveld <kris@gtk.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#if !defined(__GDKQUARTZ_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdkquartz.h> can be included directly."
+#endif
+
+#ifndef __GDK_QUARTZ_DND_H__
+#define __GDK_QUARTZ_DND_H__
+
+#include <gdk/gdk.h>
+
+G_BEGIN_DECLS
+
+#define GDK_TYPE_QUARTZ_DRAG_CONTEXT (gdk_quartz_drag_context_get_type ())
+#define GDK_QUARTZ_DRAG_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_DRAG_CONTEXT, GdkQuartzDragContext))
+#define GDK_QUARTZ_DRAG_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_DRAG_CONTEXT, GdkQuartzDragContextClass))
+#define GDK_IS_QUARTZ_DRAG_CONTEXT(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_DRAG_CONTEXT))
+#define GDK_IS_QUARTZ_DRAG_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_DRAG_CONTEXT))
+#define GDK_QUARTZ_DRAG_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_DRAG_CONTEXT, GdkQuartzDragContextClass))
+
+#ifdef GDK_COMPILATION
+typedef struct _GdkQuartzDragContext GdkQuartzDragContext;
+#else
+typedef GdkDragContext GdkQuartzDragContext;
+#endif
+typedef struct _GdkQuartzDragContextClass GdkQuartzDragContextClass;
+
+
+GType gdk_quartz_drag_context_get_type (void);
+
+id gdk_quartz_drag_context_get_dragging_info_libgtk_only (GdkDragContext *context);
+
+G_END_DECLS
+
+#endif /* __GDK_QUARTZ_DRAG_CONTEXT_H__ */
--- /dev/null
+/* gdkquartzkeyd.h
+ *
+ * Copyright (C) 2005 Imendio AB
+ * Copyright (C) 2010 Kristian Rietveld <kris@gtk.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#if !defined (__GDKQUARTZ_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdkquartz.h> can be included directly."
+#endif
+
+#ifndef __GDK_QUARTZ_KEYS_H__
+#define __GDK_QUARTZ_KEYS_H__
+
+#include <gdk/gdk.h>
+
+G_BEGIN_DECLS
+
+#define GDK_TYPE_QUARTZ_KEYMAP (gdk_quartz_keymap_get_type ())
+#define GDK_QUARTZ_KEYMAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_KEYMAP, GdkQuartzKeymap))
+#define GDK_QUARTZ_KEYMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_KEYMAP, GdkQuartzKeymapClass))
+#define GDK_IS_QUARTZ_KEYMAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_KEYMAP))
+#define GDK_IS_QUARTZ_KEYMAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_KEYMAP))
+#define GDK_QUARTZ_KEYMAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_KEYMAP, GdkQuartzKeymapClass))
+
+#ifdef GDK_COMPILATION
+typedef struct _GdkQuartzKeymap GdkQuartzKeymap;
+#else
+typedef GdkKeymap GdkQuartzKeymap;
+#endif
+typedef struct _GdkQuartzKeymapClass GdkQuartzKeymapClass;
+
+GType _gdk_quartz_keymap_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GDK_QUARTZ_KEYS_H__ */
--- /dev/null
+/* gdkquartzscreen.h
+ *
+ * Copyright (C) 2009, 2010 Kristian Rietveld <kris@gtk.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#if !defined(__GDKQUARTZ_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdkquartz.h> can be included directly."
+#endif
+
+#ifndef __GDK_QUARTZ_SCREEN_H__
+#define __GDK_QUARTZ_SCREEN_H__
+
+G_BEGIN_DECLS
+
+#include <gdk/gdk.h>
+
+#define GDK_TYPE_QUARTZ_SCREEN (_gdk_quartz_screen_get_type ())
+#define GDK_QUARTZ_SCREEN(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_SCREEN, GdkQuartzScreen))
+#define GDK_QUARTZ_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_SCREEN, GdkQuartzScreenClass))
+#define GDK_IS_QUARTZ_SCREEN(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_SCREEN))
+#define GDK_IS_QUARTZ_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_SCREEN))
+#define GDK_QUARTZ_SCREEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_SCREEN, GdkQuartzScreenClass))
+
+#ifdef GDK_COMPILATION
+typedef struct _GdkQuartzScreen GdkQuartzScreen;
+#else
+typedef GdkScreen GdkQuartzScreen;
+#endif
+typedef struct _GdkQuartzScreenClass GdkQuartzScreenClass;
+
+
+GType _gdk_quartz_screen_get_type (void);
+
+G_END_DECLS
+
+#endif /* _GDK_QUARTZ_SCREEN_H_ */
--- /dev/null
+/* gdkquartzutils.h
+ *
+ * Copyright (C) 2005 Imendio AB
+ * Copyright (C) 2010 Kristian Rietveld <kris@gtk.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#if !defined (__GDKQUARTZ_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdkquartz.h> can be included directly."
+#endif
+
+#ifndef __GDK_QUARTZ_UTILS_H__
+#define __GDK_QUARTZ_UTILS_H__
+
+#include <gdk/gdk.h>
+
+G_BEGIN_DECLS
+
+NSImage *gdk_quartz_pixbuf_to_ns_image_libgtk_only (GdkPixbuf *pixbuf);
+NSEvent *gdk_quartz_event_get_nsevent (GdkEvent *event);
+
+G_END_DECLS
+
+#endif /* __GDK_QUARTZ_UTILS_H__ */
--- /dev/null
+/* gdkquartzvisual.h
+ *
+ * Copyright (C) 2005 Imendio AB
+ * Copyright (C) 2010 Kristian Rietveld <kris@gtk.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#if !defined (__GDKQUARTZ_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdkquartz.h> can be included directly."
+#endif
+
+#ifndef __GDK_QUARTZ_VISUAL_H__
+#define __GDK_QUARTZ_VISUAL_H__
+
+#include <gdk/gdk.h>
+
+G_BEGIN_DECLS
+
+#define GDK_TYPE_QUARTZ_VISUAL (_gdk_quartz_visual_get_type ())
+#define GDK_QUARTZ_VISUAL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_VISUAL, GdkQuartzVisual))
+#define GDK_QUARTZ_VISUAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_VISUAL, GdkQuartzVisualClass))
+#define GDK_IS_QUARTZ_VISUAL(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_VISUAL))
+#define GDK_IS_QUARTZ_VISUAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_VISUAL))
+#define GDK_QUARTZ_VISUAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_VISUAL, GdkQuartzVisualClass))
+
+#ifdef GDK_COMPILATION
+typedef struct _GdkQuartzVisual GdkQuartzVisual;
+#else
+typedef GdkVisual GdkQuartzVisual;
+#endif
+typedef struct _GdkQuartzVisualClass GdkQuartzVisualClass;
+
+
+GType _gdk_quartz_visual_get_type (void);
+
+G_END_DECLS
+
+#endif /* __GDK_QUARTZ_VISUAL_H__ */
--- /dev/null
+/* gdkquartzwindow.h
+ *
+ * Copyright (C) 2005 Imendio AB
+ * Copyright (C) 2010 Kristian Rietveld <kris@gtk.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#if !defined (__GDKQUARTZ_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdkquartz.h> can be included directly."
+#endif
+
+#ifndef __GDK_QUARTZ_WINDOW_H__
+#define __GDK_QUARTZ_WINDOW_H__
+
+#include <gdk/gdk.h>
+
+G_BEGIN_DECLS
+
+#define GDK_TYPE_QUARTZ_WINDOW (gdk_quartz_window_get_type ())
+#define GDK_QUARTZ_WINDOW(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_WINDOW, GdkQuartzWindow))
+#define GDK_QUARTZ_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_WINDOW, GdkQuartzWindowClass))
+#define GDK_IS_QUARTZ_WINDOW(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_WINDOW))
+#define GDK_IS_QUARTZ_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_WINDOW))
+#define GDK_QUARTZ_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_WINDOW, GdkQuartzWindowClass))
+
+#ifdef GDK_COMPILATION
+typedef struct _GdkQuartzWindow GdkQuartzWindow;
+#else
+typedef GdkWindow GdkQuartzWindow;
+#endif
+typedef struct _GdkQuartzWindowClass GdkQuartzWindowClass;
+
+GType gdk_quartz_window_get_type (void);
+
+NSWindow *gdk_quartz_window_get_nswindow (GdkWindow *window);
+NSView *gdk_quartz_window_get_nsview (GdkWindow *window);
+
+G_END_DECLS
+
+#endif /* __GDK_QUARTZ_WINDOW_H__ */
*/
#include "config.h"
-#include "gdk.h"
-#include "gdkscreen-quartz.h"
+
+#include <gdk/gdk.h>
+
#include "gdkprivate-quartz.h"
}
}
-GdkScreen *
-_gdk_quartz_screen_new (void)
-{
- return g_object_new (GDK_TYPE_QUARTZ_SCREEN, NULL);
-}
-
static GdkDisplay *
gdk_quartz_screen_get_display (GdkScreen *screen)
{
/* gdkscreen-quartz.h
*
- * Copyright (C) 2009, 2010 Kristian Rietveld <kris@gtk.org>
+ * Copyright (C) 2009,2010 Kristian Rietveld <kris@gtk.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* Boston, MA 02111-1307, USA.
*/
-#ifndef __GDK_QUARTZ_SCREEN_H__
-#define __GDK_QUARTZ_SCREEN_H__
+#ifndef __GDK_QUARTZ_SCREEN__
+#define __GDK_QUARTZ_SCREEN__
-G_BEGIN_DECLS
-
-#include <gdk/gdkscreenprivate.h>
-
-typedef struct _GdkQuartzScreen GdkQuartzScreen;
-typedef struct _GdkQuartzScreenClass GdkQuartzScreenClass;
+#include <gdkscreenprivate.h>
-#define GDK_TYPE_QUARTZ_SCREEN (_gdk_quartz_screen_get_type ())
-#define GDK_QUARTZ_SCREEN(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_SCREEN, GdkQuartzScreen))
-#define GDK_QUARTZ_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_SCREEN, GdkQuartzScreenClass))
-#define GDK_IS_QUARTZ_SCREEN(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_SCREEN))
-#define GDK_IS_QUARTZ_SCREEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_SCREEN))
-#define GDK_QUARTZ_SCREEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_SCREEN, GdkQuartzScreenClass))
+G_BEGIN_DECLS
struct _GdkQuartzScreen
{
GdkScreenClass parent_class;
};
-GType _gdk_quartz_screen_get_type (void);
-GdkScreen *_gdk_quartz_screen_new (void);
-
G_END_DECLS
-#endif /* _GDK_QUARTZ_SCREEN_H_ */
+#endif /* __GDK_QUARTZ_SCREEN__ */
#include "config.h"
#include "gdkvisualprivate.h"
+#include "gdkquartzvisual.h"
#include "gdkprivate-quartz.h"
-GType _gdk_quartz_visual_get_type (void);
-
-#define GDK_TYPE_QUARTZ_VISUAL (_gdk_quartz_visual_get_type ())
-#define GDK_QUARTZ_VISUAL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_VISUAL, GdkQuartzVisual))
-#define GDK_QUARTZ_VISUAL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_VISUAL, GdkQuartzVisualClass))
-#define GDK_IS_QUARTZ_VISUAL(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_VISUAL))
-#define GDK_IS_QUARTZ_VISUAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_VISUAL))
-#define GDK_QUARTZ_VISUAL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_VISUAL, GdkQuartzVisualClass))
-
-typedef struct _GdkQuartzVisual GdkQuartzVisual;
-typedef struct _GdkQuartzVisualClass GdkQuartzVisualClass;
struct _GdkQuartzVisual
{
*/
#include "config.h"
-#include <Carbon/Carbon.h>
-#include "gdk.h"
-#include "gdkdeviceprivate.h"
-#include "gdkdisplayprivate.h"
+#include <gdk/gdk.h>
+#include <gdk/gdkdeviceprivate.h>
+#include <gdk/gdkdisplayprivate.h>
+
#include "gdkwindowimpl.h"
#include "gdkprivate-quartz.h"
-#include "gdkscreen-quartz.h"
-#include "gdkcursor-quartz.h"
+#include "gdkquartzscreen.h"
+#include "gdkquartzcursor.h"
+
+#include <Carbon/Carbon.h>
#include <sys/time.h>
#include <cairo-quartz.h>
GdkDevice *device,
GdkCursor *cursor)
{
- GdkQuartzCursor *cursor_private;
NSCursor *nscursor;
- cursor_private = (GdkQuartzCursor *)cursor;
-
if (GDK_WINDOW_DESTROYED (window))
return;
- if (!cursor)
- nscursor = [NSCursor arrowCursor];
- else
- nscursor = cursor_private->nscursor;
+ nscursor = _gdk_quartz_cursor_get_ns_cursor (cursor);
[nscursor set];
}
G_BEGIN_DECLS
-#define GDK_TYPE_QUARTZ_WINDOW (gdk_quartz_window_get_type ())
-#define GDK_QUARTZ_WINDOW(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_QUARTZ_WINDOW, GdkQuartzWindow))
-#define GDK_QUARTZ_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_QUARTZ_WINDOW, GdkQuartzWindowClass))
-#define GDK_IS_QUARTZ_WINDOW(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_QUARTZ_WINDOW))
-#define GDK_IS_QUARTZ_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_QUARTZ_WINDOW))
-#define GDK_QUARTZ_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_QUARTZ_WINDOW, GdkQuartzWindowClass))
-
-typedef struct _GdkQuartzWindow GdkQuartzWindow;
-typedef struct _GdkQuartzWindowClass GdkQuartzWindowClass;
-
-GType gdk_quartz_window_get_type (void);
-
-
/* Window implementation for Quartz
*/